package com.glink.manage.common.enums;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : qiushaoshan
 * @create 2025/1/21 16:43
 */
public class MqttEnum {

    public enum CarBarrierGateCmd{
        BOOT_REG("boot_reg", "设备注册")
        , BOOT_REG_RSP("boot_reg_rsp", "设备注册应答")
        , CAMERA_REGISTER("camera_register", "相机注册")
        , CAMERA_REGISTER_RSP("camera_register_rsp", "相机注册应答")
        , MQTT_HERAT("mqtt_herat", "心跳")
        , LIST_ADD("listadd", "添加名单")
        , LIST_ADD_RSP("listadd_rsp", "添加名单应答")
        , LIST_DELETE("listdelete", "名单删除")
        , LIST_DELETE_RSP("listdelete_rsp", "名单删除应答")
        , LIST_DELETE_ALL("listdeleteall", "名单全部删除")
        , LIST_DELETE_ALL_RSP("listdeleteall_rsp", "名单全部删除应答")
        , RESULT("result", "结果上报")
        , RESULT_RSP("result_rsp", "结果上报应答")
        , LIST_QUERY("listquery", "名单查询")
        , LIST_QUERY_REQ("listquery_req", "名单查询应答")
        , OFFLINE("offline", "离线")
        ;
        private String key;
        private String msg;

        CarBarrierGateCmd(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return this.key;
        }

        public String getMsg() {
            return this.msg;
        }
    }

    public enum Blacklist {
        W("W", "白名单")
        , B("B", "黑名单")
        ;
        private String key;
        private String msg;

        Blacklist(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return this.key;
        }

        public String getMsg() {
            return this.msg;
        }
    }
    
    public enum CmdStatus {
        OK("ok", "成功")
        , FAIL("fail", "失败")
        ;
        private String key;
        private String msg;

        CmdStatus(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return this.key;
        }

        public String getMsg() {
            return this.msg;
        }
    }
    
    /**
     * 返回代码
     */
    public enum RequestCode {
        SUCCESS(0, "成功")
        , ERROR(100, "设备不存在")
        , DEV_NOT_EXIST(200, "设备号不存在")
        , DATA_SAVE_FAIL(300, "数据保存失败")
        , RECORD_ONLINE(400, "比对记录上传失败")
        , DATA_ERROR(500, "数据异常")
        ;
        private int code;
        private String msg;

        RequestCode(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return this.code;
        }

        public String getMsg() {
            return this.msg;
        }
    }

    /**
     * 人员闸机方法
     */
    public enum PersonBarrierGate {
        SYNC_PERSON("sync_person", "云端下发同步人员指令")
        , DELETE_PERSON("delete_person", "云端下发删除人员指令")
        , DELETE_ALL("delete_all", "云端删除所有人员")
        ;
        private String key;
        private String msg;

        PersonBarrierGate(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return this.key;
        }

        public String getMsg() {
            return this.msg;
        }
    }

    /**
     * 人员类型
     */
    public enum PersonType {
        RESERVE("0", "待定")
        , VISITOR("1", "访客")
        , STRANGER("2", "陌生人")
        , WHITE_LIST("4", "白名单（员工）")
        , BLACKLIST("5", "黑名单")
        ;
        private String key;
        private String msg;

        PersonType(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return this.key;
        }

        public String getMsg() {
            return this.msg;
        }
    }
}
